var ecs='../Public/Js/echarts';
     require.config({
        paths:{ 
            echarts:ecs,
            'echarts/chart/bar' : ecs,
            'echarts/chart/line': ecs,
            'echarts/chart/pie': ecs,
            'echarts/chart/k': ecs, 
        }
    });

var option = {
          tooltip : { trigger: 'axis' },
         legend: { data:['2013Y','2014Y']},
           toolbox: { show : true,
                feature : {
                    mark : false,
                    dataView : {readOnly: false},
                    magicType:['line'],
                    restore : false,
                    saveAsImage : true
                }
            },
            calculable : true,

            xAxis : [
                {
                    type : 'category',
                    data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    splitArea : {show : true}
                }
            ],
            series : [
                {
                    name:'2014Y',
                    type:'line',
                    data:[16430000,15768000,28485000,21072000,21085000,29371903,36693000,29251000,28735642,11628000,'-','-']},
                {
                    name:'2013Y',
                    type:'line',
                    data:[13066000,19226537,20317000,11620000,31920000,20276000,24539000,21753000,14855000,16456000,14762000,17100000]}
            ]
        };
var option2 = {
title : { x: 40,y:10,text:'2013~2014销售额',textStyle:{ fontSize: 30,fontWeight: 'bolder',color: '#333'} },
tooltip : { trigger: 'axis' }, legend: { data:['2013Y','2014Y','2014Y-2013Y']},
            toolbox: { show : true,

                    feature : {
                    mark : true,
                    dataView : {readOnly: false},
                    magicType:['line','bar'],
                    restore : true,
                    saveAsImage : true
                }
            },
            grid : {x: 40,y:80,x2:250},
            dataZoom : {
                    show : true,
                    realtime : true,
                    //orient: 'vertical',   // 'horizontal'
                    //x: 0,
                    y: 420,
                    //width: 400,
                    height: 20,
                    backgroundColor: 'rgba(221,160,221,0.5)',
                    dataBackgroundColor: 'rgba(138,43,226,0.5)',
                    fillerColor: 'rgba(38,143,26,0.6)',
                    handleColor: 'rgba(128,43,16,0.8)',
                    //xAxisIndex:[],
                    //yAxisIndex:[],
                    start : 0,
                    end : 50
            },
            calculable : true,
            xAxis : [
                {
                    type : 'category',
                    data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    splitArea : {show : true}
                }
            ],
            series : [
                {
                    name:'2014Y',
                    type:'line',
                    data:[31.09144,29.289494,44.22494,37.650496,36.41854,50.921764,54.913064,45.224358,49.588655,20.670794,'-','-'
                    ]},
                {
                    name:'2013Y',
                    type:'line',
                    data:[25.561918,34.339531,37.468456,20.2387,53.31607,35.546518,47.598572,35.842734,25.73919,27.909795,24.591963,32.37758
                    ]},

                {
                    name:'2014Y-2013Y',
                    type:'bar',
                    data:[5.529522,-5.050037,6.756484,17.411796,-16.89753,15.375246,7.314492,9.381624,23.849465,-7.239001,-24.591963,-32.37758
                    ]},

                {
                    name:'细分',
                    type:'pie',
                    tooltip : {
                        trigger: 'item',
                        formatter: '{a} <br/>{b} : {c} ({d}%)'
                    },
                    center: [850,110],
                    radius : [0, 40],
                    itemStyle :　{ normal : { labelLine : { length : 20 } } },
                    data:[
                        {value:31.09144, name:'1月'},
                        {value:9.289494, name:'2月'},
                        {value:44.22494, name:'3月'},
                        {value:7.650496, name:'4月'},
                        {value:36.41854, name:'5月'},
                        {value:50.921764, name:'6月'},
                        {value:19.5, name:'7月'},

                    ]
                }

            ]
        };      
        require(
            [
                'echarts',
                'echarts/chart/line',
                'echarts/chart/bar',
                'echarts/chart/pie'
            ],
            function(ec) {
                var myChart = ec.init(document.getElementById('Seals'));
                myChart.setOption(option);
                var myChart2 = ec.init(document.getElementById('Sealsv'));
                myChart2.setOption(option2);
            }
        )